
***Models that give the quantities given in DummyData.dta.  Note that quantities will differ slightly for each simulation.  Simulations run in Clarify 2.1

cd "/Users/john/Dropbox/Turnout/TurnoutProjectNotes/WhoVotes/SurveyStuff"
use Final_Replication_Data, clear

***Panel A: Putin Support
estsimp logit turnout_experiment age male  townsize  kpss  econ   educ number_org follow_pol putin_support  , cluster(obl)
setx mean
setx putin_support 1
simqi
setx putin_support 5
simqi
drop b1-b10



***Panel A: Is Russia a Democracy
estsimp logit turnout_experiment age male  townsize  kpss  econ   educ number_org follow_pol  russia_democ , cluster(obl)
setx mean
setx russia_democ 0
simqi
setx russia_democ 1
simqi
drop b1-b10

***Panel A: Support for Democracy
estsimp logit turnout_experiment age male  townsize  kpss  econ   educ number_org follow_pol  democ_good   , cluster(obl)
setx mean
setx democ_good 1
simqi
setx democ_good 4
simqi
drop b1-b10

***Now one needs to enter these figures into Dummy_Data_A.dta.  This is the data used to create Panel A of Figure 1


****Panel B
estsimp logit turnout_experiment age male  townsize  kpss  econ   educ number_org follow_pol putin_support elec_honest crimea econ_better, cluster(obl)
setx mean
setx putin_support 1
simqi
setx putin_support 5
simqi
setx mean
setx crimea 1
simqi
setx crimea 4
simqi
setx mean
setx elec_honest 1
simqi
setx elec_honest 5
simqi

setx mean
setx econ_better 1
simqi
setx econ_better 3
simqi


***Now one needs to enter these figures into Dummy_Data_B.dta.  This is the data used to create Panel B of Figure 1




***Load Panel A Data
cd "/Users/john/Dropbox/Turnout/TurnoutProjectNotes/WhoVotes/Paper"
use DummyData_A.dta, clear

  graph twoway (rcap lci uci dummy_scale, lcolor("204 204 204") xsc(r(0 9)) xmlabel( 1 "Low"  2 "High" 4 "Low" 5 "High" 7 "Low" 8 "High" , labsize(vsmall)) xlabel(1.5 "{it:Putin Support}" 4.5 "{it:Russia Democ.}" 7.5 "{it:Democracy Support}"  , tlength(0) labgap(8) labsize(small)) /// 
 ytitle("Predicted Probability of Feeling a Duty to Vote" " ") xtitle(" ") ysc(r(.15(.1).6)) ylabel(.2(.1).6) legend(off) scheme(s1color) plotregion(style(none)) title("Panel A", size(medsmall)))  (rcap lci4 uci4 dummy_scale, lcolor("153 153 153") xsc(r(0 9))) (rcap lci5 uci5 dummy_scale, lcolor("0 0 0") xsc(r(0 9)) ) ///
 (scatter pred_prob dummy_scale, mcolor("204 204 204") xsc(r(0 9))  )   (scatter pred_prob4 dummy_scale, mcolor("153 153 153") xsc(r(0 9))) (scatter pred_prob5 dummy_scale, mcolor("0 0 0") xsc(r(0 9))  ) 
graph save Graph1.gph, replace



***Load Panel B Data
use DummyData_B.dta, clear


   graph twoway (rcap lci1 uci1 dummy_scale, lcolor(" 153 153 153") xsc(r(0 11)) xmlabel( 1 "Low"  2 "High" 4 "Low" 5 "High" 7 "Low" 8 "High" 10 "Low" 11 "High", labsize(vsmall)) xlabel(1.5 "{it:Putin Support}" 4.5 "{it:Crimea Support}" 7.5 "{it:Perceived Elec. Integrity}" 10.5 "{it:Econ. Performance Eval. }" , tlength(0) labgap(8) labsize(small)) /// 
 ytitle("Predicted Probability of Feeling a Duty to Vote" " ") xtitle(" ") ysc(r(.15(.1).6)) ylabel(.2(.1).6) legend(off) scheme(s1color) plotregion(style(none)) title("Panel B", size(medsmall)) ) (rcap lci2 uci2 dummy_scale, lcolor(" 102 102 102") xsc(r(0 9))  ) (rcap lci3 uci3 dummy_scale, lcolor(" 204 204 204") xsc(r(0 11))) (rcap lci4 uci4 dummy_scale, lcolor("0 0 0") xsc(r(0 11)))  ///
 (scatter pred_prob1 dummy_scale, mcolor(" 153 153 153") xsc(r(0 11))  ) (scatter pred_prob2 dummy_scale, mcolor("102 102 102") xsc(r(0 9))) (scatter pred_prob3 dummy_scale, mcolor("204 204 204") xsc(r(0 11))) (scatter pred_prob4 dummy_scale, mcolor("0 0 0") xsc(r(0 11)))  
graph save Graph2.gph, replace
 
 
 
 
**Combine Panels
graph combine Graph1.gph Graph2.gph, scheme(s1mono) rows(2) altshrink iscale(1.3) 

**Export Figure
graph export "/Users/john/Dropbox/Turnout/TurnoutProjectNotes/WhoVotes/Paper/fg1.eps", as(eps) name("Graph") replace





